home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / star_catcher.swf / scripts / DefineSprite_122 / frame_1 / DoAction.as
Encoding:
Text File  |  2012-01-07  |  1.2 KB  |  41 lines

  1. function fnEndMove(dir)
  2. {
  3.    setProperty(this, _X, eval("_root.marker" + _root.gCurrentChannel + "._x"));
  4.    if(dir == "right")
  5.    {
  6.       if(_root.gRightArrowPressed == true && _root.gCurrentChannel < _root.TOTAL_CHANNELS)
  7.       {
  8.          _root.fnMoveOlie("right");
  9.       }
  10.       else
  11.       {
  12.          _root["interface"].leftArrowBtnClip.arrow_btn.enabled = true;
  13.          _root["interface"].rightArrowBtnClip.gotoAndStop("enabled");
  14.          if(_root.gCurrentChannel >= _root.TOTAL_CHANNELS)
  15.          {
  16.             _root["interface"].rightArrowBtnClip.arrow_btn.enabled = false;
  17.          }
  18.          _root.gOlieState = "still_right";
  19.          gotoAndStop(36);
  20.       }
  21.    }
  22.    else if(dir == "left")
  23.    {
  24.       if(_root.gLeftArrowPressed == true && _root.gCurrentChannel > 1)
  25.       {
  26.          _root.fnMoveOlie("left");
  27.       }
  28.       else
  29.       {
  30.          _root["interface"].rightArrowBtnClip.arrow_btn.enabled = true;
  31.          _root["interface"].leftArrowBtnClip.gotoAndStop("enabled");
  32.          if(_root.gCurrentChannel <= 1)
  33.          {
  34.             _root["interface"].leftArrowBtnClip.arrow_btn.enabled = false;
  35.          }
  36.          _root.gOlieState = "still_left";
  37.          gotoAndStop(2);
  38.       }
  39.    }
  40. }
  41.